package com.wz.wzbubbleai.app;

import android.app.Application;
import android.content.Context;

/**
 * 全局应用程序类
 */
public class AppContext extends Application {

    private static AppContext instance;
    private static Context applicationContext;

    public static Context getAppContext() {
        return applicationContext;
    }

    public static AppContext getInstance() {
        return instance;
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        applicationContext = getApplicationContext();
        // 注册App异常崩溃处理器
        //Thread.setDefaultUncaughtExceptionHandler(AppException.getAppExceptionHandler());
        instance = this;
        init();
    }

    private void init() {
    }
}